package com.example.dc.Service.Impl;

import com.example.dc.Service.ScoreService;
import com.example.dc.domain.HealthScore;
import com.example.dc.mapper.ScoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;


/**
 * @author curry
 * @version 1.0
 * Create by 2023/10/20 10:38
 */
@Service
public class ScoreServiceImpl implements ScoreService {
    @Autowired
    private ScoreMapper scoreMapper;


    @Override
    public List<HealthScore> getAllQuestion(Integer userId, String startTime, String endTime, Integer type, Integer orderBy) {
        return scoreMapper.getAllQuestion(userId, startTime, endTime, type, orderBy);
    }

    @Override
    public HealthScore getHealthById(Integer id) {
        return scoreMapper.getHealthById(id);
    }

    @Override
    public Double sumScore(Integer userId) {
        return scoreMapper.sumScore(userId);
    }

    @Override
    public Map<String,Object> classifyScore(Integer userId){
        return scoreMapper.classifyScore(userId);
    }
}
